﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Yukkrile
{
    public class TalkRequestInfo : MarshalByRefObject
    {
        public const string TableReloadString = "!OPER_RELOADTABLE";
        public class TalkInfoEventArg : EventArgs			//情報を引き渡すイベント引数クラス
        {
            private string m_String = "";			//文字列
            public string String { get { return m_String; } set { m_String = value; } }
            private int m_Ratio = 100;
            public int Ratio { get { return m_Ratio; } set { m_Ratio = value; } }
            public TalkInfoEventArg(string str, int ratio)
            {
                m_String = str;
                m_Ratio = ratio;
            }
        }
        public delegate void CallEventHandler(TalkInfoEventArg e);
        public event CallEventHandler OnTrance;
        public void DataTrance(string s, int ratio)
        {
            if (OnTrance != null)
                OnTrance(new TalkInfoEventArg(s, ratio));
        }

    }

    public class FinishInfo : MarshalByRefObject
    {
        public class ReadFinishEventArg : EventArgs			//情報を引き渡すイベント引数クラス
        {
            public int Code { get; set; }
            public string Description { get; set; }
            public ReadFinishEventArg(int code, string desc)
            {
                Code = code;
                Description = desc;
            }
        }
        public delegate void FinishEventHandler(ReadFinishEventArg e);
        public event FinishEventHandler OnReadFinished;
        public void ReadFinished(int ret, string desc)
        {
            if (OnReadFinished != null)
                OnReadFinished(new ReadFinishEventArg(ret, desc));
        }
    }
}
